<template>
	<view class="page">
		<uni-nav-bar background-color="#00a9ff" title="测评问卷" color="white" :fixed="true" 
		  statusBar="true" left-icon="left" @clickLeft="back"/>
		  
		<!-- 问卷 -->
				  
		<button class="btn" @click="submit">开始对话</button>
	</view>
</template>

<script>
	import date from '../../common/date.js'
	export default {
		data() {
			return {
				conversationList:[]
			}
		},
		onShow() {
			this.conversationList= uni.getStorageSync('chats')||[];
		},
		methods: {
			back(){
				uni.navigateBack()
			},
			submit(){
				//保存问卷填写详情
				const cur = date.getDate()+' '+date.getTime()
				let addlist = {time:cur}
				this.conversationList.push(addlist)
				uni.setStorageSync('chats',this.conversationList)
				
				uni.navigateTo({
					url:`/pages/dialogue/dialogue?chattime=${cur}`
				})
			}
		}
	}
</script>

<style>

</style>
